//
//  LKHomeTopCell.m
//  LKIntelligentVideoProject
//
//  Created by she1323 on 2018/9/28.
//  Copyright © 2018年 she1323. All rights reserved.
//

#import "LKHomeTopCell.h"

#import <SDCycleScrollView/SDCycleScrollView.h>

@interface LKHomeTopCell()<SDCycleScrollViewDelegate>

@property(nonatomic,strong)SDCycleScrollView *cycleScrollView;

@end
@implementation LKHomeTopCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self setUpUI];
    // Initialization code
}
- (void)setUpUI
{
    SDCycleScrollView *cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, WIDTH, self.contentView.frame.size.height) imageNamesGroup:@[@"ad_1",@"ad_2",@"ad_3",@"ad_4"]];
    cycleScrollView.delegate = self;
    cycleScrollView.currentPageDotColor = [UIColor whiteColor];
    cycleScrollView.pageDotColor = COLOR_HEX(0xA2AEFF);
    _cycleScrollView = cycleScrollView;
    _cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
    _cycleScrollView.autoScrollTimeInterval = 3.0;
    [self.contentView addSubview:cycleScrollView];
    [cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
       make.edges.equalTo(self.contentView).with.insets(UIEdgeInsetsMake(0, 0, 0, 0));
    }];
    
}
-(void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index{
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
